﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;//Please add references
namespace EnterpriseFund.DAL
{
    /// <summary>
    /// 数据访问类:GS_SB_ZSXX
    /// </summary>
    public partial class GS_SB_ZSXX
    {
        public GS_SB_ZSXX()
        { }
        #region  BasicMethod

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(decimal FYear, int FPeriod)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from fund.t_GS_SB_ZSXX");
            strSql.Append(" where FYear=@FYear and FPeriod=@FPeriod ");
            SqlParameter[] parameters = {
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FPeriod", SqlDbType.Int,4)			};
            parameters[0].Value = FYear;
            parameters[1].Value = FPeriod;

            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }

        /// <summary>
        /// 获取当前最大批次
        /// </summary>
        public string GetFPeriod()
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(@"SELECT FYear,MAX(FPeriod) AS FPeriod
  FROM [fund].[t_GS_SB_ZSXX]
GROUP BY  FYear  HAVING FYear=MAX(FYear)");
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    return ds.Tables[0].Rows[0]["FYear"] + "年第" + ds.Tables[0].Rows[0]["FPeriod"] + "批";
                }
            }
            return "";
        }

        public bool ExistsTaxAuditDate(decimal FYear, int FPeriod)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) from fund.t_TaxAudit_SB_ZSXX");
            strSql.Append(" where ZSXH in (select ZSXH from fund.t_GS_SB_ZSXX where FYear=@FYear and FPeriod=@FPeriod) and FDataSource='GS' ");
            SqlParameter[] parameters = {
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FPeriod", SqlDbType.Int,4)			};
            parameters[0].Value = FYear;
            parameters[1].Value = FPeriod;
            return DbHelperSQL.Exists(strSql.ToString(), parameters);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public decimal Add(EnterpriseFund.Model.GS_SB_ZSXX model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into fund.t_GS_SB_ZSXX(");
            strSql.Append("NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber)");
            strSql.Append(" values (");
            strSql.Append("@NSRDZDAH,@NSRSBH,@NSRMC,@SSSQ_Q,@SSSQ_Z,@ZSXM_DM,@ZSXM_MC,@ZSPM_DM,@ZSPM_MC,@SKZL_DM,@SKZL_MC,@SKSX_DM,@SKSX_MC,@SKCSFS_DM,@SKCSFS_MC,@QLQQSLX_DM,@QLQQSLX_MC,@TZLX_DM,@TZLX_MC,@SL,@SE,@YZPZXH,@YZPZZL_DM,@YZPZZL_MC,@YZPZLRR_DM,@YZPZLRR_MC,@YZFSRQ,@JKQX,@JKPZXH,@JKPZZL_DM,@JKPZZL_MC,@JKPZLRR_DM,@JKPZLRR_MC,@KPRQ,@YSSPHM,@JKFSRQ,@HZJKSH,@SJRQ,@SJXHR_DM,@SJXHR_MC,@SJXHRQ,@RKRQ,@RKXHR_DM,@RKXHR_MC,@RKXHRQ,@DJZCLX_DM,@DJZCLX_MC,@HY_DM,@HY_MC,@ZSFS_DM,@ZSFS_MC,@YSKM_DM,@YSKM_MC,@YSFPBL_DM,@YSFPBL_MC,@YSFPBL_ZY,@YSFPBL_SS,@YSFPBL_DS,@YSFPBL_XQ,@YSFPBL_XZ,@YSFPBL_XC,@SKGK_DM,@SKGK_MC,@ZGSWRY_DM,@ZGSWRY_MC,@SKSS_SWJG_DM,@SKSS_SWJG_MC,@ZSJG_DM,@ZSJG_MC,@NSR_SWJG_DM,@NSR_SWJG_MC,@YH_DM,@YH_MC,@YHZL_DM,@YHZL_MC,@YHZH,@YSLWQH,@YSJYH,@FExcelFileName,@FExcelRowNumber)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20),
					new SqlParameter("@NSRMC", SqlDbType.NVarChar,80),
					new SqlParameter("@SSSQ_Q", SqlDbType.DateTime),
					new SqlParameter("@SSSQ_Z", SqlDbType.DateTime),
					new SqlParameter("@ZSXM_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZSXM_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@ZSPM_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@ZSPM_MC", SqlDbType.NVarChar,150),
					new SqlParameter("@SKZL_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKZL_MC", SqlDbType.NVarChar,12),
					new SqlParameter("@SKSX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKSX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@SKCSFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKCSFS_MC", SqlDbType.NVarChar,30),
					new SqlParameter("@QLQQSLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@QLQQSLX_MC", SqlDbType.NVarChar,30),
					new SqlParameter("@TZLX_DM", SqlDbType.NVarChar,1),
					new SqlParameter("@TZLX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@SL", SqlDbType.Decimal,5),
					new SqlParameter("@SE", SqlDbType.Decimal,9),
					new SqlParameter("@YZPZXH", SqlDbType.Decimal,13),
					new SqlParameter("@YZPZZL_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@YZPZZL_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@YZPZLRR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@YZPZLRR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@YZFSRQ", SqlDbType.DateTime),
					new SqlParameter("@JKQX", SqlDbType.DateTime),
					new SqlParameter("@JKPZXH", SqlDbType.Decimal,13),
					new SqlParameter("@JKPZZL_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@JKPZZL_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@JKPZLRR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@JKPZLRR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@KPRQ", SqlDbType.DateTime),
					new SqlParameter("@YSSPHM", SqlDbType.NVarChar,15),
					new SqlParameter("@JKFSRQ", SqlDbType.DateTime),
					new SqlParameter("@HZJKSH", SqlDbType.Decimal,13),
					new SqlParameter("@SJRQ", SqlDbType.DateTime),
					new SqlParameter("@SJXHR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@SJXHR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@SJXHRQ", SqlDbType.DateTime),
					new SqlParameter("@RKRQ", SqlDbType.DateTime),
					new SqlParameter("@RKXHR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@RKXHR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@RKXHRQ", SqlDbType.DateTime),
					new SqlParameter("@DJZCLX_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@DJZCLX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@HY_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@HY_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@ZSFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZSFS_MC", SqlDbType.NVarChar,100),
					new SqlParameter("@YSKM_DM", SqlDbType.NVarChar,15),
					new SqlParameter("@YSKM_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@YSFPBL_DM", SqlDbType.NVarChar,10),
					new SqlParameter("@YSFPBL_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@YSFPBL_ZY", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_SS", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_DS", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XQ", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XZ", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XC", SqlDbType.Decimal,5),
					new SqlParameter("@SKGK_DM", SqlDbType.NVarChar,15),
					new SqlParameter("@SKGK_MC", SqlDbType.NVarChar,80),
					new SqlParameter("@ZGSWRY_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@ZGSWRY_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@SKSS_SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@SKSS_SWJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@ZSJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@ZSJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@NSR_SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@NSR_SWJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@YH_DM", SqlDbType.NVarChar,8),
					new SqlParameter("@YH_MC", SqlDbType.NVarChar,80),
					new SqlParameter("@YHZL_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@YHZL_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@YHZH", SqlDbType.NVarChar,30),
					new SqlParameter("@YSLWQH", SqlDbType.NVarChar,50),
					new SqlParameter("@YSJYH", SqlDbType.NVarChar,50),
					new SqlParameter("@FExcelFileName", SqlDbType.NVarChar,255),
					new SqlParameter("@FExcelRowNumber", SqlDbType.Decimal,9)};
            parameters[0].Value = model.NSRDZDAH;
            parameters[1].Value = model.NSRSBH;
            parameters[2].Value = model.NSRMC;
            parameters[3].Value = model.SSSQ_Q;
            parameters[4].Value = model.SSSQ_Z;
            parameters[5].Value = model.ZSXM_DM;
            parameters[6].Value = model.ZSXM_MC;
            parameters[7].Value = model.ZSPM_DM;
            parameters[8].Value = model.ZSPM_MC;
            parameters[9].Value = model.SKZL_DM;
            parameters[10].Value = model.SKZL_MC;
            parameters[11].Value = model.SKSX_DM;
            parameters[12].Value = model.SKSX_MC;
            parameters[13].Value = model.SKCSFS_DM;
            parameters[14].Value = model.SKCSFS_MC;
            parameters[15].Value = model.QLQQSLX_DM;
            parameters[16].Value = model.QLQQSLX_MC;
            parameters[17].Value = model.TZLX_DM;
            parameters[18].Value = model.TZLX_MC;
            parameters[19].Value = model.SL;
            parameters[20].Value = model.SE;
            parameters[21].Value = model.YZPZXH;
            parameters[22].Value = model.YZPZZL_DM;
            parameters[23].Value = model.YZPZZL_MC;
            parameters[24].Value = model.YZPZLRR_DM;
            parameters[25].Value = model.YZPZLRR_MC;
            parameters[26].Value = model.YZFSRQ;
            parameters[27].Value = model.JKQX;
            parameters[28].Value = model.JKPZXH;
            parameters[29].Value = model.JKPZZL_DM;
            parameters[30].Value = model.JKPZZL_MC;
            parameters[31].Value = model.JKPZLRR_DM;
            parameters[32].Value = model.JKPZLRR_MC;
            parameters[33].Value = model.KPRQ;
            parameters[34].Value = model.YSSPHM;
            parameters[35].Value = model.JKFSRQ;
            parameters[36].Value = model.HZJKSH;
            parameters[37].Value = model.SJRQ;
            parameters[38].Value = model.SJXHR_DM;
            parameters[39].Value = model.SJXHR_MC;
            parameters[40].Value = model.SJXHRQ;
            parameters[41].Value = model.RKRQ;
            parameters[42].Value = model.RKXHR_DM;
            parameters[43].Value = model.RKXHR_MC;
            parameters[44].Value = model.RKXHRQ;
            parameters[45].Value = model.DJZCLX_DM;
            parameters[46].Value = model.DJZCLX_MC;
            parameters[47].Value = model.HY_DM;
            parameters[48].Value = model.HY_MC;
            parameters[49].Value = model.ZSFS_DM;
            parameters[50].Value = model.ZSFS_MC;
            parameters[51].Value = model.YSKM_DM;
            parameters[52].Value = model.YSKM_MC;
            parameters[53].Value = model.YSFPBL_DM;
            parameters[54].Value = model.YSFPBL_MC;
            parameters[55].Value = model.YSFPBL_ZY;
            parameters[56].Value = model.YSFPBL_SS;
            parameters[57].Value = model.YSFPBL_DS;
            parameters[58].Value = model.YSFPBL_XQ;
            parameters[59].Value = model.YSFPBL_XZ;
            parameters[60].Value = model.YSFPBL_XC;
            parameters[61].Value = model.SKGK_DM;
            parameters[62].Value = model.SKGK_MC;
            parameters[63].Value = model.ZGSWRY_DM;
            parameters[64].Value = model.ZGSWRY_MC;
            parameters[65].Value = model.SKSS_SWJG_DM;
            parameters[66].Value = model.SKSS_SWJG_MC;
            parameters[67].Value = model.ZSJG_DM;
            parameters[68].Value = model.ZSJG_MC;
            parameters[69].Value = model.NSR_SWJG_DM;
            parameters[70].Value = model.NSR_SWJG_MC;
            parameters[71].Value = model.YH_DM;
            parameters[72].Value = model.YH_MC;
            parameters[73].Value = model.YHZL_DM;
            parameters[74].Value = model.YHZL_MC;
            parameters[75].Value = model.YHZH;
            parameters[76].Value = model.YSLWQH;
            parameters[77].Value = model.YSJYH;
            parameters[78].Value = model.FExcelFileName;
            parameters[79].Value = model.FExcelRowNumber;

            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToDecimal(obj);
            }
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.GS_SB_ZSXX DataRowToModel(DataRow row)
        {
            Model.GS_SB_ZSXX model = new Model.GS_SB_ZSXX();
            if (row != null)
            {
                if (row["ZSXH"] != null && row["ZSXH"].ToString() != "")
                {
                    model.ZSXH = decimal.Parse(row["ZSXH"].ToString());
                }
                if (row["NSRDZDAH"] != null && row["NSRDZDAH"].ToString() != "")
                {
                    model.NSRDZDAH = decimal.Parse(row["NSRDZDAH"].ToString());
                }
                if (row["NSRSBH"] != null)
                {
                    model.NSRSBH = row["NSRSBH"].ToString();
                }
                if (row["NSRMC"] != null)
                {
                    model.NSRMC = row["NSRMC"].ToString();
                }
                if (row["SSSQ_Q"] != null && row["SSSQ_Q"].ToString() != "")
                {
                    model.SSSQ_Q = DateTime.Parse(row["SSSQ_Q"].ToString());
                }
                if (row["SSSQ_Z"] != null && row["SSSQ_Z"].ToString() != "")
                {
                    model.SSSQ_Z = DateTime.Parse(row["SSSQ_Z"].ToString());
                }
                if (row["ZSXM_DM"] != null)
                {
                    model.ZSXM_DM = row["ZSXM_DM"].ToString();
                }
                if (row["ZSXM_MC"] != null)
                {
                    model.ZSXM_MC = row["ZSXM_MC"].ToString();
                }
                if (row["ZSPM_DM"] != null)
                {
                    model.ZSPM_DM = row["ZSPM_DM"].ToString();
                }
                if (row["ZSPM_MC"] != null)
                {
                    model.ZSPM_MC = row["ZSPM_MC"].ToString();
                }
                if (row["SKZL_DM"] != null)
                {
                    model.SKZL_DM = row["SKZL_DM"].ToString();
                }
                if (row["SKZL_MC"] != null)
                {
                    model.SKZL_MC = row["SKZL_MC"].ToString();
                }
                if (row["SKSX_DM"] != null)
                {
                    model.SKSX_DM = row["SKSX_DM"].ToString();
                }
                if (row["SKSX_MC"] != null)
                {
                    model.SKSX_MC = row["SKSX_MC"].ToString();
                }
                if (row["SKCSFS_DM"] != null)
                {
                    model.SKCSFS_DM = row["SKCSFS_DM"].ToString();
                }
                if (row["SKCSFS_MC"] != null)
                {
                    model.SKCSFS_MC = row["SKCSFS_MC"].ToString();
                }
                if (row["QLQQSLX_DM"] != null)
                {
                    model.QLQQSLX_DM = row["QLQQSLX_DM"].ToString();
                }
                if (row["QLQQSLX_MC"] != null)
                {
                    model.QLQQSLX_MC = row["QLQQSLX_MC"].ToString();
                }
                if (row["TZLX_DM"] != null)
                {
                    model.TZLX_DM = row["TZLX_DM"].ToString();
                }
                if (row["TZLX_MC"] != null)
                {
                    model.TZLX_MC = row["TZLX_MC"].ToString();
                }
                if (row["SL"] != null && row["SL"].ToString() != "")
                {
                    model.SL = decimal.Parse(row["SL"].ToString());
                }
                if (row["SE"] != null && row["SE"].ToString() != "")
                {
                    model.SE = decimal.Parse(row["SE"].ToString());
                }
                if (row["YZPZXH"] != null && row["YZPZXH"].ToString() != "")
                {
                    model.YZPZXH = decimal.Parse(row["YZPZXH"].ToString());
                }
                if (row["YZPZZL_DM"] != null)
                {
                    model.YZPZZL_DM = row["YZPZZL_DM"].ToString();
                }
                if (row["YZPZZL_MC"] != null)
                {
                    model.YZPZZL_MC = row["YZPZZL_MC"].ToString();
                }
                if (row["YZPZLRR_DM"] != null)
                {
                    model.YZPZLRR_DM = row["YZPZLRR_DM"].ToString();
                }
                if (row["YZPZLRR_MC"] != null)
                {
                    model.YZPZLRR_MC = row["YZPZLRR_MC"].ToString();
                }
                if (row["YZFSRQ"] != null && row["YZFSRQ"].ToString() != "")
                {
                    model.YZFSRQ = DateTime.Parse(row["YZFSRQ"].ToString());
                }
                if (row["JKQX"] != null && row["JKQX"].ToString() != "")
                {
                    model.JKQX = DateTime.Parse(row["JKQX"].ToString());
                }
                if (row["JKPZXH"] != null && row["JKPZXH"].ToString() != "")
                {
                    model.JKPZXH = decimal.Parse(row["JKPZXH"].ToString());
                }
                if (row["JKPZZL_DM"] != null)
                {
                    model.JKPZZL_DM = row["JKPZZL_DM"].ToString();
                }
                if (row["JKPZZL_MC"] != null)
                {
                    model.JKPZZL_MC = row["JKPZZL_MC"].ToString();
                }
                if (row["JKPZLRR_DM"] != null)
                {
                    model.JKPZLRR_DM = row["JKPZLRR_DM"].ToString();
                }
                if (row["JKPZLRR_MC"] != null)
                {
                    model.JKPZLRR_MC = row["JKPZLRR_MC"].ToString();
                }
                if (row["KPRQ"] != null && row["KPRQ"].ToString() != "")
                {
                    model.KPRQ = DateTime.Parse(row["KPRQ"].ToString());
                }
                if (row["YSSPHM"] != null)
                {
                    model.YSSPHM = row["YSSPHM"].ToString();
                }
                if (row["JKFSRQ"] != null && row["JKFSRQ"].ToString() != "")
                {
                    model.JKFSRQ = DateTime.Parse(row["JKFSRQ"].ToString());
                }
                if (row["HZJKSH"] != null && row["HZJKSH"].ToString() != "")
                {
                    model.HZJKSH = decimal.Parse(row["HZJKSH"].ToString());
                }
                if (row["SJRQ"] != null && row["SJRQ"].ToString() != "")
                {
                    model.SJRQ = DateTime.Parse(row["SJRQ"].ToString());
                }
                if (row["SJXHR_DM"] != null)
                {
                    model.SJXHR_DM = row["SJXHR_DM"].ToString();
                }
                if (row["SJXHR_MC"] != null)
                {
                    model.SJXHR_MC = row["SJXHR_MC"].ToString();
                }
                if (row["SJXHRQ"] != null && row["SJXHRQ"].ToString() != "")
                {
                    model.SJXHRQ = DateTime.Parse(row["SJXHRQ"].ToString());
                }
                if (row["RKRQ"] != null && row["RKRQ"].ToString() != "")
                {
                    model.RKRQ = DateTime.Parse(row["RKRQ"].ToString());
                }
                if (row["RKXHR_DM"] != null)
                {
                    model.RKXHR_DM = row["RKXHR_DM"].ToString();
                }
                if (row["RKXHR_MC"] != null)
                {
                    model.RKXHR_MC = row["RKXHR_MC"].ToString();
                }
                if (row["RKXHRQ"] != null && row["RKXHRQ"].ToString() != "")
                {
                    model.RKXHRQ = DateTime.Parse(row["RKXHRQ"].ToString());
                }
                if (row["DJZCLX_DM"] != null)
                {
                    model.DJZCLX_DM = row["DJZCLX_DM"].ToString();
                }
                if (row["DJZCLX_MC"] != null)
                {
                    model.DJZCLX_MC = row["DJZCLX_MC"].ToString();
                }
                if (row["HY_DM"] != null)
                {
                    model.HY_DM = row["HY_DM"].ToString();
                }
                if (row["HY_MC"] != null)
                {
                    model.HY_MC = row["HY_MC"].ToString();
                }
                if (row["ZSFS_DM"] != null)
                {
                    model.ZSFS_DM = row["ZSFS_DM"].ToString();
                }
                if (row["ZSFS_MC"] != null)
                {
                    model.ZSFS_MC = row["ZSFS_MC"].ToString();
                }
                if (row["YSKM_DM"] != null)
                {
                    model.YSKM_DM = row["YSKM_DM"].ToString();
                }
                if (row["YSKM_MC"] != null)
                {
                    model.YSKM_MC = row["YSKM_MC"].ToString();
                }
                if (row["YSFPBL_DM"] != null)
                {
                    model.YSFPBL_DM = row["YSFPBL_DM"].ToString();
                }
                if (row["YSFPBL_MC"] != null)
                {
                    model.YSFPBL_MC = row["YSFPBL_MC"].ToString();
                }
                if (row["YSFPBL_ZY"] != null && row["YSFPBL_ZY"].ToString() != "")
                {
                    model.YSFPBL_ZY = decimal.Parse(row["YSFPBL_ZY"].ToString());
                }
                if (row["YSFPBL_SS"] != null && row["YSFPBL_SS"].ToString() != "")
                {
                    model.YSFPBL_SS = decimal.Parse(row["YSFPBL_SS"].ToString());
                }
                if (row["YSFPBL_DS"] != null && row["YSFPBL_DS"].ToString() != "")
                {
                    model.YSFPBL_DS = decimal.Parse(row["YSFPBL_DS"].ToString());
                }
                if (row["YSFPBL_XQ"] != null && row["YSFPBL_XQ"].ToString() != "")
                {
                    model.YSFPBL_XQ = decimal.Parse(row["YSFPBL_XQ"].ToString());
                }
                if (row["YSFPBL_XZ"] != null && row["YSFPBL_XZ"].ToString() != "")
                {
                    model.YSFPBL_XZ = decimal.Parse(row["YSFPBL_XZ"].ToString());
                }
                if (row["YSFPBL_XC"] != null && row["YSFPBL_XC"].ToString() != "")
                {
                    model.YSFPBL_XC = decimal.Parse(row["YSFPBL_XC"].ToString());
                }
                if (row["SKGK_DM"] != null)
                {
                    model.SKGK_DM = row["SKGK_DM"].ToString();
                }
                if (row["SKGK_MC"] != null)
                {
                    model.SKGK_MC = row["SKGK_MC"].ToString();
                }
                if (row["ZGSWRY_DM"] != null)
                {
                    model.ZGSWRY_DM = row["ZGSWRY_DM"].ToString();
                }
                if (row["ZGSWRY_MC"] != null)
                {
                    model.ZGSWRY_MC = row["ZGSWRY_MC"].ToString();
                }
                if (row["SKSS_SWJG_DM"] != null)
                {
                    model.SKSS_SWJG_DM = row["SKSS_SWJG_DM"].ToString();
                }
                if (row["SKSS_SWJG_MC"] != null)
                {
                    model.SKSS_SWJG_MC = row["SKSS_SWJG_MC"].ToString();
                }
                if (row["ZSJG_DM"] != null)
                {
                    model.ZSJG_DM = row["ZSJG_DM"].ToString();
                }
                if (row["ZSJG_MC"] != null)
                {
                    model.ZSJG_MC = row["ZSJG_MC"].ToString();
                }
                if (row["NSR_SWJG_DM"] != null)
                {
                    model.NSR_SWJG_DM = row["NSR_SWJG_DM"].ToString();
                }
                if (row["NSR_SWJG_MC"] != null)
                {
                    model.NSR_SWJG_MC = row["NSR_SWJG_MC"].ToString();
                }
                if (row["YH_DM"] != null)
                {
                    model.YH_DM = row["YH_DM"].ToString();
                }
                if (row["YH_MC"] != null)
                {
                    model.YH_MC = row["YH_MC"].ToString();
                }
                if (row["YHZL_DM"] != null)
                {
                    model.YHZL_DM = row["YHZL_DM"].ToString();
                }
                if (row["YHZL_MC"] != null)
                {
                    model.YHZL_MC = row["YHZL_MC"].ToString();
                }
                if (row["YHZH"] != null)
                {
                    model.YHZH = row["YHZH"].ToString();
                }
                if (row["YSLWQH"] != null)
                {
                    model.YSLWQH = row["YSLWQH"].ToString();
                }
                if (row["YSJYH"] != null)
                {
                    model.YSJYH = row["YSJYH"].ToString();
                }
                if (row["FExcelFileName"] != null)
                {
                    model.FExcelFileName = row["FExcelFileName"].ToString();
                }
                if (row["FExcelRowNumber"] != null && row["FExcelRowNumber"].ToString() != "")
                {
                    model.FExcelRowNumber = decimal.Parse(row["FExcelRowNumber"].ToString());
                }
                if (row["FYear"] != null && row["FYear"].ToString() != "")
                {
                    model.FYear = decimal.Parse(row["FYear"].ToString());
                }
                if (row["FPeriod"] != null && row["FPeriod"].ToString() != "")
                {
                    model.FPeriod = int.Parse(row["FPeriod"].ToString());
                }
            }
            return model;
        }

        /// <summary>
        /// 删除该年度下该期数据
        /// </summary>
        public bool Delete(decimal FYear, int FPeriod)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete from fund.t_GS_SB_ZSXX ");
            strSql.Append(" where FYear=@FYear and FPeriod=@FPeriod ");
            SqlParameter[] parameters = {
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FPeriod", SqlDbType.Int,4)			};
            parameters[0].Value = FYear;
            parameters[1].Value = FPeriod;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
            if (rows > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        /// <summary>
        /// 获取记录总数
        /// </summary>
        public int GetRecordCount(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select count(1) FROM fund.t_GS_SB_ZSXX ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            object obj = DbHelperSQL.GetSingle(strSql.ToString());
            if (obj == null)
            {
                return 0;
            }
            else
            {
                return Convert.ToInt32(obj);
            }
        }
         
        /// <summary>
        /// 比较国税导入数据是否有误
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="outTimes"></param>
        /// <returns></returns>
        public Model.GSGompareDate GompareImportDate(DataTable dt, int outTimes = 60*60)
        {
             StringBuilder strSql = new StringBuilder();
            SqlConnection conn = new SqlConnection(DbHelperSQL.connectionString);
            conn.Open();
            SqlTransaction tran = conn.BeginTransaction();
            SqlCommand command = new SqlCommand();
            command.CommandTimeout = outTimes;
            string str = "";
            try
            {
                strSql = new StringBuilder();
                strSql.Append("SELECT  * ");
                strSql.Append(" INTO  #GS_SB_ZSXX");
                strSql.Append(" FROM  fund.t_GS_SB_ZSXX");
                strSql.Append(" WHERE   0 = 1");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                foreach (DataRow dr in dt.Rows)
                {
                    strSql = new StringBuilder();
                    strSql.Append("insert into  #GS_SB_ZSXX(");
                    strSql.Append("NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber,FYear,FPeriod,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP)");
                    strSql.Append(" values (");
                    strSql.Append("@NSRDZDAH,@NSRSBH,@NSRMC,@SSSQ_Q,@SSSQ_Z,@ZSXM_DM,@ZSXM_MC,@ZSPM_DM,@ZSPM_MC,@SKZL_DM,@SKZL_MC,@SKSX_DM,@SKSX_MC,@SKCSFS_DM,@SKCSFS_MC,@QLQQSLX_DM,@QLQQSLX_MC,@TZLX_DM,@TZLX_MC,@SL,@SE,@YZPZXH,@YZPZZL_DM,@YZPZZL_MC,@YZPZLRR_DM,@YZPZLRR_MC,@YZFSRQ,@JKQX,@JKPZXH,@JKPZZL_DM,@JKPZZL_MC,@JKPZLRR_DM,@JKPZLRR_MC,@KPRQ,@YSSPHM,@JKFSRQ,@HZJKSH,@SJRQ,@SJXHR_DM,@SJXHR_MC,@SJXHRQ,@RKRQ,@RKXHR_DM,@RKXHR_MC,@RKXHRQ,@DJZCLX_DM,@DJZCLX_MC,@HY_DM,@HY_MC,@ZSFS_DM,@ZSFS_MC,@YSKM_DM,@YSKM_MC,@YSFPBL_DM,@YSFPBL_MC,@YSFPBL_ZY,@YSFPBL_SS,@YSFPBL_DS,@YSFPBL_XQ,@YSFPBL_XZ,@YSFPBL_XC,@SKGK_DM,@SKGK_MC,@ZGSWRY_DM,@ZGSWRY_MC,@SKSS_SWJG_DM,@SKSS_SWJG_MC,@ZSJG_DM,@ZSJG_MC,@NSR_SWJG_DM,@NSR_SWJG_MC,@YH_DM,@YH_MC,@YHZL_DM,@YHZL_MC,@YHZH,@YSLWQH,@YSJYH,@FExcelFileName,@FExcelRowNumber,@FYear,@FPeriod,@FEntityNo,@FInsEmpNo,@FInsDeptNo,@FInsDate,@FInsIP)");
                    strSql.Append(";select @@IDENTITY");
                    SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20),
					new SqlParameter("@NSRMC", SqlDbType.NVarChar,80),
					new SqlParameter("@SSSQ_Q", SqlDbType.DateTime),
					new SqlParameter("@SSSQ_Z", SqlDbType.DateTime),
					new SqlParameter("@ZSXM_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZSXM_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@ZSPM_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@ZSPM_MC", SqlDbType.NVarChar,150),
					new SqlParameter("@SKZL_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKZL_MC", SqlDbType.NVarChar,12),
					new SqlParameter("@SKSX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKSX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@SKCSFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKCSFS_MC", SqlDbType.NVarChar,30),
					new SqlParameter("@QLQQSLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@QLQQSLX_MC", SqlDbType.NVarChar,30),
					new SqlParameter("@TZLX_DM", SqlDbType.NVarChar,1),
					new SqlParameter("@TZLX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@SL", SqlDbType.Decimal,13),
					new SqlParameter("@SE", SqlDbType.Decimal,9),
					new SqlParameter("@YZPZXH", SqlDbType.Decimal,13),
					new SqlParameter("@YZPZZL_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@YZPZZL_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@YZPZLRR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@YZPZLRR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@YZFSRQ", SqlDbType.DateTime),
					new SqlParameter("@JKQX", SqlDbType.DateTime),
					new SqlParameter("@JKPZXH", SqlDbType.Decimal,13),
					new SqlParameter("@JKPZZL_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@JKPZZL_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@JKPZLRR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@JKPZLRR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@KPRQ", SqlDbType.DateTime),
					new SqlParameter("@YSSPHM", SqlDbType.NVarChar,15),
					new SqlParameter("@JKFSRQ", SqlDbType.DateTime),
					new SqlParameter("@HZJKSH", SqlDbType.Decimal,13),
					new SqlParameter("@SJRQ", SqlDbType.DateTime),
					new SqlParameter("@SJXHR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@SJXHR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@SJXHRQ", SqlDbType.DateTime),
					new SqlParameter("@RKRQ", SqlDbType.DateTime),
					new SqlParameter("@RKXHR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@RKXHR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@RKXHRQ", SqlDbType.DateTime),
					new SqlParameter("@DJZCLX_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@DJZCLX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@HY_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@HY_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@ZSFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZSFS_MC", SqlDbType.NVarChar,100),
					new SqlParameter("@YSKM_DM", SqlDbType.NVarChar,15),
					new SqlParameter("@YSKM_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@YSFPBL_DM", SqlDbType.NVarChar,10),
					new SqlParameter("@YSFPBL_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@YSFPBL_ZY", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_SS", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_DS", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XQ", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XZ", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XC", SqlDbType.Decimal,5),
					new SqlParameter("@SKGK_DM", SqlDbType.NVarChar,15),
					new SqlParameter("@SKGK_MC", SqlDbType.NVarChar,80),
					new SqlParameter("@ZGSWRY_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@ZGSWRY_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@SKSS_SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@SKSS_SWJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@ZSJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@ZSJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@NSR_SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@NSR_SWJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@YH_DM", SqlDbType.NVarChar,8),
					new SqlParameter("@YH_MC", SqlDbType.NVarChar,80),
					new SqlParameter("@YHZL_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@YHZL_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@YHZH", SqlDbType.NVarChar,30),
					new SqlParameter("@YSLWQH", SqlDbType.NVarChar,50),
					new SqlParameter("@YSJYH", SqlDbType.NVarChar,50),
					new SqlParameter("@FExcelFileName", SqlDbType.NVarChar,255),
					new SqlParameter("@FExcelRowNumber", SqlDbType.Decimal,9),
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FPeriod", SqlDbType.Int,4),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsEmpNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FInsDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsDate", SqlDbType.DateTime),
					new SqlParameter("@FInsIP", SqlDbType.NVarChar,15)};
                    parameters[0].Value = dr["NSRDZDAH"];
                    parameters[1].Value = dr["NSRSBH"];
                    parameters[2].Value = dr["NSRMC"];
                    parameters[3].Value = dr["SSSQ_Q"];
                    parameters[4].Value = dr["SSSQ_Z"];
                    parameters[5].Value = dr["ZSXM_DM"];
                    parameters[6].Value = dr["ZSXM_MC"];
                    parameters[7].Value = dr["ZSPM_DM"];
                    parameters[8].Value = dr["ZSPM_MC"];
                    parameters[9].Value = dr["SKZL_DM"];
                    parameters[10].Value = dr["SKZL_MC"];
                    parameters[11].Value = dr["SKSX_DM"];
                    parameters[12].Value = dr["SKSX_MC"];
                    parameters[13].Value = dr["SKCSFS_DM"];
                    parameters[14].Value = dr["SKCSFS_MC"];
                    parameters[15].Value = dr["QLQQSLX_DM"];
                    parameters[16].Value = dr["QLQQSLX_MC"];
                    parameters[17].Value = dr["TZLX_DM"];
                    parameters[18].Value = dr["TZLX_MC"];
                    parameters[19].Value = dr["SL"];
                    parameters[20].Value = dr["SE"];
                    parameters[21].Value = dr["YZPZXH"];
                    parameters[22].Value = dr["YZPZZL_DM"];
                    parameters[23].Value = dr["YZPZZL_MC"];
                    parameters[24].Value = dr["YZPZLRR_DM"];
                    parameters[25].Value = dr["YZPZLRR_MC"];
                    parameters[26].Value = dr["YZFSRQ"];
                    parameters[27].Value = dr["JKQX"];
                    parameters[28].Value = dr["JKPZXH"];
                    parameters[29].Value = dr["JKPZZL_DM"];
                    parameters[30].Value = dr["JKPZZL_MC"];
                    parameters[31].Value = dr["JKPZLRR_DM"];
                    parameters[32].Value = dr["JKPZLRR_MC"];
                    parameters[33].Value = dr["KPRQ"];
                    parameters[34].Value = dr["YSSPHM"];
                    parameters[35].Value = dr["JKFSRQ"];
                    parameters[36].Value = dr["HZJKSH"];
                    parameters[37].Value = dr["SJRQ"];
                    parameters[38].Value = dr["SJXHR_DM"];
                    parameters[39].Value = dr["SJXHR_MC"];
                    parameters[40].Value = dr["SJXHRQ"];
                    parameters[41].Value = dr["RKRQ"];
                    parameters[42].Value = dr["RKXHR_DM"];
                    parameters[43].Value = dr["RKXHR_MC"];
                    parameters[44].Value = dr["RKXHRQ"];
                    parameters[45].Value = dr["DJZCLX_DM"];
                    parameters[46].Value = dr["DJZCLX_MC"];
                    parameters[47].Value = dr["HY_DM"];
                    parameters[48].Value = dr["HY_MC"];
                    parameters[49].Value = dr["ZSFS_DM"];
                    parameters[50].Value = dr["ZSFS_MC"];
                    parameters[51].Value = dr["YSKM_DM"];
                    parameters[52].Value = dr["YSKM_MC"];
                    parameters[53].Value = dr["YSFPBL_DM"];
                    parameters[54].Value = dr["YSFPBL_MC"];
                    parameters[55].Value = dr["YSFPBL_ZY"];
                    parameters[56].Value = dr["YSFPBL_SS"];
                    parameters[57].Value = dr["YSFPBL_DS"];
                    parameters[58].Value = dr["YSFPBL_XQ"];
                    parameters[59].Value = dr["YSFPBL_XZ"];
                    parameters[60].Value = dr["YSFPBL_XC"];
                    parameters[61].Value = dr["SKGK_DM"];
                    parameters[62].Value = dr["SKGK_MC"];
                    parameters[63].Value = dr["ZGSWRY_DM"];
                    parameters[64].Value = dr["ZGSWRY_MC"];
                    parameters[65].Value = dr["SKSS_SWJG_DM"];
                    parameters[66].Value = dr["SKSS_SWJG_MC"];
                    parameters[67].Value = dr["ZSJG_DM"];
                    parameters[68].Value = dr["ZSJG_MC"];
                    parameters[69].Value = dr["NSR_SWJG_DM"];
                    parameters[70].Value = dr["NSR_SWJG_MC"];
                    parameters[71].Value = dr["YH_DM"];
                    parameters[72].Value = dr["YH_MC"];
                    parameters[73].Value = dr["YHZL_DM"];
                    parameters[74].Value = dr["YHZL_MC"];
                    parameters[75].Value = dr["YHZH"];
                    parameters[76].Value = dr["YSLWQH"];
                    parameters[77].Value = dr["YSJYH"];
                    parameters[78].Value = dr["FExcelFileName"];
                    parameters[79].Value = dr["FExcelRowNumber"];
                    parameters[80].Value = dr["FYear"];
                    parameters[81].Value = dr["FPeriod"];
                    parameters[82].Value = dr["FEntityNo"];
                    parameters[83].Value = dr["FInsEmpNo"];
                    parameters[84].Value = dr["FInsDeptNo"];
                    parameters[85].Value = dr["FInsDate"];
                    parameters[86].Value = dr["FInsIP"];

                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;

                    foreach (SqlParameter parameter in parameters)
                    {
                        command.Parameters.Add(parameter);
                    }

                    command.ExecuteNonQuery();
                }
                strSql = new StringBuilder();
                strSql.Append("UPDATE #GS_SB_ZSXX SET NSRDZDAH =  B.NSRDZDAH FROM fund.V_DJ_NSRXX B, #GS_SB_ZSXX A  WHERE (A.NSRSBH=B.NSRSBH AND A.NSRMC = B.NSRMC) OR (A.NSRSBH=B.GS_NSRSBH AND A.NSRMC = B.GS_NSRMC) ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE #GS_SB_ZSXX SET NSRDZDAH =  B.NSRDZDAH FROM fund.t_DJ_OTHER_NSRXX B, #GS_SB_ZSXX A  WHERE (A.NSRSBH=B.GS_NSRSBH AND A.NSRMC = B.GS_NSRMC) ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE #GS_SB_ZSXX SET ZSXM_DM =  A.FTaxClassNo FROM fund.t_TaxClass a, #GS_SB_ZSXX b WHERE b. ZSXM_MC=a.FTaxClassName OR  b.ZSXM_MC=a.FNationalTaxClassName ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE  #GS_SB_ZSXX SET SKZL_DM =  A.SKZL_DM FROM ltais.DM_SKZL a, #GS_SB_ZSXX b WHERE b.SKZL_MC=a.SKZL_MC OR b.SKZL_MC=a.GS_SKZL_MC  ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE #GS_SB_ZSXX SET SKSX_DM = A.SKSX_DM FROM ltais.DM_SKSX a, #GS_SB_ZSXX b WHERE b.SKSX_MC=a.SKSX_MC OR b.SKSX_MC=a.GS_SKSX_MC");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE  #GS_SB_ZSXX SET SKCSFS_DM = A.SKCSFS_DM FROM ltais.DM_SKCSFS a, #GS_SB_ZSXX b WHERE b.SKCSFS_MC=a.SKCSFS_MC OR b.SKCSFS_MC=a.GS_SKCSFS_MC");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE #GS_SB_ZSXX SET QLQQSLX_DM =  A.QSLX_DM FROM ltais.DM_QSLX a, #GS_SB_ZSXX b WHERE b.QLQQSLX_MC=a.QSLX_MC OR b.QLQQSLX_MC=a.GS_QSLX_MC ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE #GS_SB_ZSXX SET TZLX_DM =  A.TZLX_DM FROM ltais.DM_TZLX a, #GS_SB_ZSXX b WHERE b.TZLX_MC=a.TZLX_MC OR b.TZLX_MC=a.GS_TZLX_MC ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("UPDATE #GS_SB_ZSXX SET YZPZZL_DM = A.PZZL_DM FROM ltais.DM_PZZL a, #GS_SB_ZSXX b WHERE b.YZPZZL_MC=a.PZZL_MC OR b.YZPZZL_MC=a.GS_PZZL_MC  ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append(" UPDATE #GS_SB_ZSXX SET ZSPM_DM = A.FTaxItemNo FROM fund.t_TaxItem a, #GS_SB_ZSXX b WHERE b.ZSPM_MC=a.FTaxItemName OR b.ZSPM_MC=a.FNationalTaxItemName   ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append(" UPDATE #GS_SB_ZSXX SET JKPZZL_DM = A.PZZL_DM FROM ltais.DM_PZZL a, #GS_SB_ZSXX b WHERE b.JKPZZL_MC=a.PZZL_MC OR b.JKPZZL_MC=a.GS_PZZL_MC   ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("  UPDATE  #GS_SB_ZSXX SET DJZCLX_DM = A.DJZCLX_DM FROM ltais.DM_DJZCLX a, #GS_SB_ZSXX b WHERE b.DJZCLX_MC=a.DJZCLX_MC OR b.DJZCLX_MC=a.GS_DJZCLX_MC  ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("   UPDATE  #GS_SB_ZSXX SET HY_DM =  A.HYDL_DM FROM ltais.DM_HYDL a, #GS_SB_ZSXX b WHERE b.HY_MC=a.HYDL_MC OR b.HY_MC=a.GS_HYDL_MC  ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("  UPDATE  #GS_SB_ZSXX SET ZSFS_DM = A.ZSFS_DM FROM ltais.DM_ZSFS a, #GS_SB_ZSXX b WHERE b.ZSFS_MC=a.ZSFS_MC OR b.ZSFS_MC=a.GS_ZSFS_MC  ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("  UPDATE  #GS_SB_ZSXX SET YSKM_DM = A.YSKM_DM FROM ltais.DM_YSKM a, #GS_SB_ZSXX b WHERE b.YSKM_MC=a.YSKM_MC OR b.YSKM_MC=a.GS_YSKM_MC   ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("  UPDATE  #GS_SB_ZSXX SET YSFPBL_DM = A.YSFPBL_DM FROM ltais.DM_YSFPBL a, #GS_SB_ZSXX b WHERE b.YSFPBL_MC=a.YSFPBL_MC OR b.YSFPBL_MC=a.GS_YSFPBL_MC   ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                strSql = new StringBuilder();
                strSql.Append("  UPDATE  #GS_SB_ZSXX SET SKGK_DM = A.SKGK_DM FROM ltais.DM_SKGK a, #GS_SB_ZSXX b WHERE b.SKGK_MC=a.SKGK_MC OR b.SKGK_MC=a.GS_SKGK_MC ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                DataSet NoDS = new DataSet();
                strSql = new StringBuilder();
                strSql.Append(@"select * from #GS_SB_ZSXX  where NSRDZDAH is null or 
                                                                (ZSXM_DM is null and ZSXM_MC is not null) or 
                                                                (SKZL_DM is null and SKZL_MC is not null) or 
                                                                (SKSX_DM is null and SKSX_MC is not null) or 
                                                                (SKCSFS_DM is null and SKCSFS_MC is not null) or 
                                                                (QLQQSLX_DM is null and QLQQSLX_MC is not null) or 
                                                                (TZLX_DM is null and TZLX_MC is not null) or 
                                                                (YZPZZL_DM is null  and YZPZZL_MC is not null) or 
                                                                (ZSPM_DM is null and ZSPM_MC is not null) or 
                                                                (JKPZZL_DM is null and JKPZZL_MC is not null) or 
                                                                (DJZCLX_DM is null and DJZCLX_MC is not null) or 
                                                                (HY_DM is null and HY_MC is not null) or 
                                                                (ZSFS_DM is null and ZSFS_MC is not null) or 
                                                                (YSKM_DM is null and YSKM_MC is not null) or 
                                                                (YSFPBL_DM is null and YSFPBL_MC is not null) or 
                                                                (SKGK_DM is null and SKGK_MC is not null)   ");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;

                SqlDataAdapter command2 = new SqlDataAdapter(command);

                command2.Fill(NoDS, "NoDS");
                DataTable newDt = NoDS.Tables[0];
                if (newDt.Rows.Count > 0)
                {
                    Model.GSGompareDate gnew = new Model.GSGompareDate();
                    gnew.ErrorData = newDt;
                    gnew.Message = "数据存在错误！请进行修改后导入！";
                    return gnew;
                }
                else
                {
                    strSql.Append(" INSERT  INTO  fund.t_GS_SB_ZSXX (NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber,FYear,FPeriod,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP)");
                    strSql.Append(" SELECT  NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber,FYear,FPeriod,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP");
                    strSql.Append(" FROM    #GS_SB_ZSXX");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append(" DROP TABLE #GS_SB_ZSXX");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();
                    Model.GSGompareDate gnew = new Model.GSGompareDate();
                    gnew.ErrorData = newDt;
                    gnew.Message = "操作成功";
                    tran.Commit();
                    return gnew;
                }
            }
            catch (Exception ex)
            {
                tran.Rollback();
                str = "导入异常";
                Model.GSGompareDate gnew = new Model.GSGompareDate();
                gnew.ErrorData = null;
                gnew.Message = "导入异常!";
                return gnew;
            }
            finally
            {
                conn.Close();
            }
        }

        public string ImportDate(DataTable dt,  int outTimes = 60*60)
        {
            StringBuilder strSql = new StringBuilder();
            SqlConnection conn = new SqlConnection(DbHelperSQL.connectionString);
            conn.Open();
            SqlTransaction tran = conn.BeginTransaction();
            SqlCommand command = new SqlCommand();
            command.CommandTimeout = outTimes;
            string str = "";
            try
            {
                strSql = new StringBuilder();
                strSql.Append("SELECT  * ");
                strSql.Append(" INTO  #GS_SB_ZSXX");
                strSql.Append(" FROM  fund.t_GS_SB_ZSXX");
                strSql.Append(" WHERE   0 = 1");
                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;
                command.ExecuteNonQuery();

                foreach (DataRow dr in dt.Rows)
                {
                    strSql = new StringBuilder();
                    strSql.Append("insert into  #GS_SB_ZSXX(");
                    strSql.Append("NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber,FYear,FPeriod,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP)");
                    strSql.Append(" values (");
                    strSql.Append("@NSRDZDAH,@NSRSBH,@NSRMC,@SSSQ_Q,@SSSQ_Z,@ZSXM_DM,@ZSXM_MC,@ZSPM_DM,@ZSPM_MC,@SKZL_DM,@SKZL_MC,@SKSX_DM,@SKSX_MC,@SKCSFS_DM,@SKCSFS_MC,@QLQQSLX_DM,@QLQQSLX_MC,@TZLX_DM,@TZLX_MC,@SL,@SE,@YZPZXH,@YZPZZL_DM,@YZPZZL_MC,@YZPZLRR_DM,@YZPZLRR_MC,@YZFSRQ,@JKQX,@JKPZXH,@JKPZZL_DM,@JKPZZL_MC,@JKPZLRR_DM,@JKPZLRR_MC,@KPRQ,@YSSPHM,@JKFSRQ,@HZJKSH,@SJRQ,@SJXHR_DM,@SJXHR_MC,@SJXHRQ,@RKRQ,@RKXHR_DM,@RKXHR_MC,@RKXHRQ,@DJZCLX_DM,@DJZCLX_MC,@HY_DM,@HY_MC,@ZSFS_DM,@ZSFS_MC,@YSKM_DM,@YSKM_MC,@YSFPBL_DM,@YSFPBL_MC,@YSFPBL_ZY,@YSFPBL_SS,@YSFPBL_DS,@YSFPBL_XQ,@YSFPBL_XZ,@YSFPBL_XC,@SKGK_DM,@SKGK_MC,@ZGSWRY_DM,@ZGSWRY_MC,@SKSS_SWJG_DM,@SKSS_SWJG_MC,@ZSJG_DM,@ZSJG_MC,@NSR_SWJG_DM,@NSR_SWJG_MC,@YH_DM,@YH_MC,@YHZL_DM,@YHZL_MC,@YHZH,@YSLWQH,@YSJYH,@FExcelFileName,@FExcelRowNumber,@FYear,@FPeriod,@FEntityNo,@FInsEmpNo,@FInsDeptNo,@FInsDate,@FInsIP)");
                    strSql.Append(";select @@IDENTITY");
                    SqlParameter[] parameters = {
					new SqlParameter("@NSRDZDAH", SqlDbType.Decimal,13),
					new SqlParameter("@NSRSBH", SqlDbType.NVarChar,20),
					new SqlParameter("@NSRMC", SqlDbType.NVarChar,80),
					new SqlParameter("@SSSQ_Q", SqlDbType.DateTime),
					new SqlParameter("@SSSQ_Z", SqlDbType.DateTime),
					new SqlParameter("@ZSXM_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZSXM_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@ZSPM_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@ZSPM_MC", SqlDbType.NVarChar,150),
					new SqlParameter("@SKZL_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKZL_MC", SqlDbType.NVarChar,12),
					new SqlParameter("@SKSX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKSX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@SKCSFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@SKCSFS_MC", SqlDbType.NVarChar,30),
					new SqlParameter("@QLQQSLX_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@QLQQSLX_MC", SqlDbType.NVarChar,30),
					new SqlParameter("@TZLX_DM", SqlDbType.NVarChar,1),
					new SqlParameter("@TZLX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@SL", SqlDbType.Decimal,13),
					new SqlParameter("@SE", SqlDbType.Decimal,9),
					new SqlParameter("@YZPZXH", SqlDbType.Decimal,13),
					new SqlParameter("@YZPZZL_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@YZPZZL_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@YZPZLRR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@YZPZLRR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@YZFSRQ", SqlDbType.DateTime),
					new SqlParameter("@JKQX", SqlDbType.DateTime),
					new SqlParameter("@JKPZXH", SqlDbType.Decimal,13),
					new SqlParameter("@JKPZZL_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@JKPZZL_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@JKPZLRR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@JKPZLRR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@KPRQ", SqlDbType.DateTime),
					new SqlParameter("@YSSPHM", SqlDbType.NVarChar,15),
					new SqlParameter("@JKFSRQ", SqlDbType.DateTime),
					new SqlParameter("@HZJKSH", SqlDbType.Decimal,13),
					new SqlParameter("@SJRQ", SqlDbType.DateTime),
					new SqlParameter("@SJXHR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@SJXHR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@SJXHRQ", SqlDbType.DateTime),
					new SqlParameter("@RKRQ", SqlDbType.DateTime),
					new SqlParameter("@RKXHR_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@RKXHR_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@RKXHRQ", SqlDbType.DateTime),
					new SqlParameter("@DJZCLX_DM", SqlDbType.NVarChar,3),
					new SqlParameter("@DJZCLX_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@HY_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@HY_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@ZSFS_DM", SqlDbType.NVarChar,2),
					new SqlParameter("@ZSFS_MC", SqlDbType.NVarChar,100),
					new SqlParameter("@YSKM_DM", SqlDbType.NVarChar,15),
					new SqlParameter("@YSKM_MC", SqlDbType.NVarChar,50),
					new SqlParameter("@YSFPBL_DM", SqlDbType.NVarChar,10),
					new SqlParameter("@YSFPBL_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@YSFPBL_ZY", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_SS", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_DS", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XQ", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XZ", SqlDbType.Decimal,5),
					new SqlParameter("@YSFPBL_XC", SqlDbType.Decimal,5),
					new SqlParameter("@SKGK_DM", SqlDbType.NVarChar,15),
					new SqlParameter("@SKGK_MC", SqlDbType.NVarChar,80),
					new SqlParameter("@ZGSWRY_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@ZGSWRY_MC", SqlDbType.NVarChar,20),
					new SqlParameter("@SKSS_SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@SKSS_SWJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@ZSJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@ZSJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@NSR_SWJG_DM", SqlDbType.NVarChar,11),
					new SqlParameter("@NSR_SWJG_MC", SqlDbType.NVarChar,60),
					new SqlParameter("@YH_DM", SqlDbType.NVarChar,8),
					new SqlParameter("@YH_MC", SqlDbType.NVarChar,80),
					new SqlParameter("@YHZL_DM", SqlDbType.NVarChar,4),
					new SqlParameter("@YHZL_MC", SqlDbType.NVarChar,40),
					new SqlParameter("@YHZH", SqlDbType.NVarChar,30),
					new SqlParameter("@YSLWQH", SqlDbType.NVarChar,50),
					new SqlParameter("@YSJYH", SqlDbType.NVarChar,50),
					new SqlParameter("@FExcelFileName", SqlDbType.NVarChar,255),
					new SqlParameter("@FExcelRowNumber", SqlDbType.Decimal,9),
					new SqlParameter("@FYear", SqlDbType.Decimal,5),
					new SqlParameter("@FPeriod", SqlDbType.Int,4),
					new SqlParameter("@FEntityNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsEmpNo", SqlDbType.NVarChar,15),
					new SqlParameter("@FInsDeptNo", SqlDbType.NVarChar,12),
					new SqlParameter("@FInsDate", SqlDbType.DateTime),
					new SqlParameter("@FInsIP", SqlDbType.NVarChar,15)};
                    parameters[0].Value = dr["NSRDZDAH"];
                    parameters[1].Value = dr["NSRSBH"];
                    parameters[2].Value = dr["NSRMC"];
                    parameters[3].Value = dr["SSSQ_Q"];
                    parameters[4].Value = dr["SSSQ_Z"];
                    parameters[5].Value = dr["ZSXM_DM"];
                    parameters[6].Value = dr["ZSXM_MC"];
                    parameters[7].Value = dr["ZSPM_DM"];
                    parameters[8].Value = dr["ZSPM_MC"];
                    parameters[9].Value = dr["SKZL_DM"];
                    parameters[10].Value = dr["SKZL_MC"];
                    parameters[11].Value = dr["SKSX_DM"];
                    parameters[12].Value = dr["SKSX_MC"];
                    parameters[13].Value = dr["SKCSFS_DM"];
                    parameters[14].Value = dr["SKCSFS_MC"];
                    parameters[15].Value = dr["QLQQSLX_DM"];
                    parameters[16].Value = dr["QLQQSLX_MC"];
                    parameters[17].Value = dr["TZLX_DM"];
                    parameters[18].Value = dr["TZLX_MC"];
                    parameters[19].Value = dr["SL"];
                    parameters[20].Value = dr["SE"];
                    parameters[21].Value = dr["YZPZXH"];
                    parameters[22].Value = dr["YZPZZL_DM"];
                    parameters[23].Value = dr["YZPZZL_MC"];
                    parameters[24].Value = dr["YZPZLRR_DM"];
                    parameters[25].Value = dr["YZPZLRR_MC"];
                    parameters[26].Value = dr["YZFSRQ"];
                    parameters[27].Value = dr["JKQX"];
                    parameters[28].Value = dr["JKPZXH"];
                    parameters[29].Value = dr["JKPZZL_DM"];
                    parameters[30].Value = dr["JKPZZL_MC"];
                    parameters[31].Value = dr["JKPZLRR_DM"];
                    parameters[32].Value = dr["JKPZLRR_MC"];
                    parameters[33].Value = dr["KPRQ"];
                    parameters[34].Value = dr["YSSPHM"];
                    parameters[35].Value = dr["JKFSRQ"];
                    parameters[36].Value = dr["HZJKSH"];
                    parameters[37].Value = dr["SJRQ"];
                    parameters[38].Value = dr["SJXHR_DM"];
                    parameters[39].Value = dr["SJXHR_MC"];
                    parameters[40].Value = dr["SJXHRQ"];
                    parameters[41].Value = dr["RKRQ"];
                    parameters[42].Value = dr["RKXHR_DM"];
                    parameters[43].Value = dr["RKXHR_MC"];
                    parameters[44].Value = dr["RKXHRQ"];
                    parameters[45].Value = dr["DJZCLX_DM"];
                    parameters[46].Value = dr["DJZCLX_MC"];
                    parameters[47].Value = dr["HY_DM"];
                    parameters[48].Value = dr["HY_MC"];
                    parameters[49].Value = dr["ZSFS_DM"];
                    parameters[50].Value = dr["ZSFS_MC"];
                    parameters[51].Value = dr["YSKM_DM"];
                    parameters[52].Value = dr["YSKM_MC"];
                    parameters[53].Value = dr["YSFPBL_DM"];
                    parameters[54].Value = dr["YSFPBL_MC"];
                    parameters[55].Value = dr["YSFPBL_ZY"];
                    parameters[56].Value = dr["YSFPBL_SS"];
                    parameters[57].Value = dr["YSFPBL_DS"];
                    parameters[58].Value = dr["YSFPBL_XQ"];
                    parameters[59].Value = dr["YSFPBL_XZ"];
                    parameters[60].Value = dr["YSFPBL_XC"];
                    parameters[61].Value = dr["SKGK_DM"];
                    parameters[62].Value = dr["SKGK_MC"];
                    parameters[63].Value = dr["ZGSWRY_DM"];
                    parameters[64].Value = dr["ZGSWRY_MC"];
                    parameters[65].Value = dr["SKSS_SWJG_DM"];
                    parameters[66].Value = dr["SKSS_SWJG_MC"];
                    parameters[67].Value = dr["ZSJG_DM"];
                    parameters[68].Value = dr["ZSJG_MC"];
                    parameters[69].Value = dr["NSR_SWJG_DM"];
                    parameters[70].Value = dr["NSR_SWJG_MC"];
                    parameters[71].Value = dr["YH_DM"];
                    parameters[72].Value = dr["YH_MC"];
                    parameters[73].Value = dr["YHZL_DM"];
                    parameters[74].Value = dr["YHZL_MC"];
                    parameters[75].Value = dr["YHZH"];
                    parameters[76].Value = dr["YSLWQH"];
                    parameters[77].Value = dr["YSJYH"];
                    parameters[78].Value = dr["FExcelFileName"];
                    parameters[79].Value = dr["FExcelRowNumber"];
                    parameters[80].Value = dr["FYear"];
                    parameters[81].Value = dr["FPeriod"];
                    parameters[82].Value = dr["FEntityNo"];
                    parameters[83].Value = dr["FInsEmpNo"];
                    parameters[84].Value = dr["FInsDeptNo"];
                    parameters[85].Value = dr["FInsDate"];
                    parameters[86].Value = dr["FInsIP"];

                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;

                    foreach (SqlParameter parameter in parameters)
                    {
                        command.Parameters.Add(parameter);
                    }

                    command.ExecuteNonQuery();

                    //使用sqlbulkcopy导入xml到 临时表里
                    //SqlBulkCopy sqlbulkcopy = new SqlBulkCopy(conn, SqlBulkCopyOptions.KeepIdentity, tran);
                    //sqlbulkcopy.DestinationTableName = "#GS_SB_ZSXX";//数据库中的表名
                    //sqlbulkcopy.BulkCopyTimeout = outTimes;
                    //sqlbulkcopy.WriteToServer(dt);

                }

                DataSet NoDS = new DataSet();
                strSql = new StringBuilder();
                strSql.Append("select NSRSBH,NSRMC from #GS_SB_ZSXX where NSRSBH NOT IN (SELECT A.NSRSBH FROM  #GS_SB_ZSXX A ,fund.V_DJ_NSRXX B ");
                strSql.Append(" WHERE (A.NSRSBH=B.NSRSBH AND A.NSRMC = B.NSRMC) OR (A.NSRSBH=B.GS_NSRSBH AND A.NSRMC = B.GS_NSRSBH) )");

                command = new SqlCommand(strSql.ToString(), conn, tran);
                command.CommandTimeout = outTimes;

                SqlDataAdapter command2 = new SqlDataAdapter(command);

                command2.Fill(NoDS, "NoDS");

                 
                if (NoDS.Tables[0].Rows.Count == 0)
                {

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE #GS_SB_ZSXX SET NSRDZDAH =  B.NSRDZDAH FROM fund.V_DJ_NSRXX B, #GS_SB_ZSXX A  WHERE (A.NSRSBH=B.NSRSBH AND A.NSRMC = B.NSRMC) OR (A.NSRSBH=B.GS_NSRSBH AND A.NSRMC = B.GS_NSRMC) ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE #GS_SB_ZSXX SET NSRDZDAH =  B.NSRDZDAH FROM fund.t_DJ_OTHER_NSRXX B, #GS_SB_ZSXX A  WHERE (A.NSRSBH=B.GS_NSRSBH AND A.NSRMC = B.GS_NSRMC) ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE #GS_SB_ZSXX SET ZSXM_DM =  A.FTaxClassNo FROM fund.t_TaxClass a, #GS_SB_ZSXX b WHERE b. ZSXM_MC=a.FTaxClassName OR  b.ZSXM_MC=a.FNationalTaxClassName ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE  #GS_SB_ZSXX SET SKZL_DM =  A.SKZL_DM FROM ltais.DM_SKZL a, #GS_SB_ZSXX b WHERE b.SKZL_MC=a.SKZL_MC OR b.SKZL_MC=a.GS_SKZL_MC  ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE #GS_SB_ZSXX SET SKSX_DM = A.SKSX_DM FROM ltais.DM_SKSX a, #GS_SB_ZSXX b WHERE b.SKSX_MC=a.SKSX_MC OR b.SKSX_MC=a.GS_SKSX_MC");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE  #GS_SB_ZSXX SET SKCSFS_DM = A.SKCSFS_DM FROM ltais.DM_SKCSFS a, #GS_SB_ZSXX b WHERE b.SKCSFS_MC=a.SKCSFS_MC OR b.SKCSFS_MC=a.GS_SKCSFS_MC");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE #GS_SB_ZSXX SET QLQQSLX_DM =  A.QSLX_DM FROM ltais.DM_QSLX a, #GS_SB_ZSXX b WHERE b.QLQQSLX_MC=a.QSLX_MC OR b.QLQQSLX_MC=a.GS_QSLX_MC ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE #GS_SB_ZSXX SET TZLX_DM =  A.TZLX_DM FROM ltais.DM_TZLX a, #GS_SB_ZSXX b WHERE b.TZLX_MC=a.TZLX_MC OR b.TZLX_MC=a.GS_TZLX_MC ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("UPDATE #GS_SB_ZSXX SET YZPZZL_DM = A.PZZL_DM FROM ltais.DM_PZZL a, #GS_SB_ZSXX b WHERE b.YZPZZL_MC=a.PZZL_MC OR b.YZPZZL_MC=a.GS_PZZL_MC  ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append(" UPDATE #GS_SB_ZSXX SET ZSPM_DM = A.FTaxItemNo FROM fund.t_TaxItem a, #GS_SB_ZSXX b WHERE b.ZSPM_MC=a.FTaxItemName OR b.ZSPM_MC=a.FNationalTaxItemName   ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append(" UPDATE #GS_SB_ZSXX SET JKPZZL_DM = A.PZZL_DM FROM ltais.DM_PZZL a, #GS_SB_ZSXX b WHERE b.JKPZZL_MC=a.PZZL_MC OR b.JKPZZL_MC=a.GS_PZZL_MC   ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("  UPDATE  #GS_SB_ZSXX SET DJZCLX_DM = A.DJZCLX_DM FROM ltais.DM_DJZCLX a, #GS_SB_ZSXX b WHERE b.DJZCLX_MC=a.DJZCLX_MC OR b.DJZCLX_MC=a.GS_DJZCLX_MC  ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("   UPDATE  #GS_SB_ZSXX SET HY_DM =  A.HYDL_DM FROM ltais.DM_HYDL a, #GS_SB_ZSXX b WHERE b.HY_MC=a.HYDL_MC OR b.HY_MC=a.GS_HYDL_MC  ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("  UPDATE  #GS_SB_ZSXX SET ZSFS_DM = A.ZSFS_DM FROM ltais.DM_ZSFS a, #GS_SB_ZSXX b WHERE b.ZSFS_MC=a.ZSFS_MC OR b.ZSFS_MC=a.GS_ZSFS_MC  ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("  UPDATE  #GS_SB_ZSXX SET YSKM_DM = A.YSKM_DM FROM ltais.DM_YSKM a, #GS_SB_ZSXX b WHERE b.YSKM_MC=a.YSKM_MC OR b.YSKM_MC=a.GS_YSKM_MC   ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("  UPDATE  #GS_SB_ZSXX SET YSFPBL_DM = A.YSFPBL_DM FROM ltais.DM_YSFPBL a, #GS_SB_ZSXX b WHERE b.YSFPBL_MC=a.YSFPBL_MC OR b.YSFPBL_MC=a.GS_YSFPBL_MC   ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append("  UPDATE  #GS_SB_ZSXX SET SKGK_DM = A.SKGK_DM FROM ltais.DM_SKGK a, #GS_SB_ZSXX b WHERE b.SKGK_MC=a.SKGK_MC OR b.SKGK_MC=a.GS_SKGK_MC ");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    //DataSet NoDS2 = new DataSet();
                    //strSql = new StringBuilder();
                    //strSql.Append("select * from  #GS_SB_ZSXX");
                    //strSql.Append(" ");

                    //command = new SqlCommand(strSql.ToString(), conn, tran);
                    //command.CommandTimeout = outTimes;

                    //SqlDataAdapter command3 = new SqlDataAdapter(command);

                    //command3.Fill(NoDS2, "NoDS");


                    //if (isDel == "Y")
                    //{
                    //    strSql.Append(" delete from fund.t_GS_SB_ZSXX");
                    //    strSql.Append(" where " + strwhere);
                    //    command = new SqlCommand(strSql.ToString(), conn, tran);
                    //    command.CommandTimeout = outTimes;
                    //    command.ExecuteNonQuery();
                    //}

                    strSql.Append(" INSERT  INTO  fund.t_GS_SB_ZSXX (NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber,FYear,FPeriod,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP)");
                    strSql.Append(" SELECT  NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber,FYear,FPeriod,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP");
                    strSql.Append(" FROM    #GS_SB_ZSXX");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();

                    strSql = new StringBuilder();
                    strSql.Append(" DROP TABLE #GS_SB_ZSXX");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();
                    str = "操作成功";
                }
                else
                {
                    str += "以下人员纳税人识别号或姓名异常请修改后继续操作：\n";
                    foreach (DataRow dr in NoDS.Tables[0].Rows)
                    {
                        str += "纳税人识别号:" + dr["NSRSBH"] + ",名称:" + dr["NSRMC"] + "\n";
                    }

                    strSql = new StringBuilder();
                    strSql.Append(" DROP TABLE #GS_SB_ZSXX");
                    command = new SqlCommand(strSql.ToString(), conn, tran);
                    command.CommandTimeout = outTimes;
                    command.ExecuteNonQuery();
                }

                tran.Commit();

                return str;

            }
            catch (Exception ex)
            {
                tran.Rollback();
                str = "导入异常";
                
                return str;
            }
            finally
            {
                conn.Close();
            }
            
            
        }

        #region  BasicMethod
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ZSXH,NSRDZDAH,NSRSBH,NSRMC,SSSQ_Q,SSSQ_Z,ZSXM_DM,ZSXM_MC,ZSPM_DM,ZSPM_MC,SKZL_DM,SKZL_MC,SKSX_DM,SKSX_MC,SKCSFS_DM,SKCSFS_MC,QLQQSLX_DM,QLQQSLX_MC,TZLX_DM,TZLX_MC,SL,SE,YZPZXH,YZPZZL_DM,YZPZZL_MC,YZPZLRR_DM,YZPZLRR_MC,YZFSRQ,JKQX,JKPZXH,JKPZZL_DM,JKPZZL_MC,JKPZLRR_DM,JKPZLRR_MC,KPRQ,YSSPHM,JKFSRQ,HZJKSH,SJRQ,SJXHR_DM,SJXHR_MC,SJXHRQ,RKRQ,RKXHR_DM,RKXHR_MC,RKXHRQ,DJZCLX_DM,DJZCLX_MC,HY_DM,HY_MC,ZSFS_DM,ZSFS_MC,YSKM_DM,YSKM_MC,YSFPBL_DM,YSFPBL_MC,YSFPBL_ZY,YSFPBL_SS,YSFPBL_DS,YSFPBL_XQ,YSFPBL_XZ,YSFPBL_XC,SKGK_DM,SKGK_MC,ZGSWRY_DM,ZGSWRY_MC,SKSS_SWJG_DM,SKSS_SWJG_MC,ZSJG_DM,ZSJG_MC,NSR_SWJG_DM,NSR_SWJG_MC,YH_DM,YH_MC,YHZL_DM,YHZL_MC,YHZH,YSLWQH,YSJYH,FExcelFileName,FExcelRowNumber,FYear,FPeriod,FEntityNo,FInsEmpNo,FInsDeptNo,FInsDate,FInsIP ");
            strSql.Append(" FROM fund.t_GS_SB_ZSXX ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(strSql.ToString());
        }
        #endregion  BasicMethod
        #region  ExtensionMethod

        #endregion  ExtensionMethod

        #endregion  BasicMethod
    }
}

